#ifndef CIRCLE_H
#define CIRCLE_H

#include <QSharedPointer>

#include "../geometry/point.h"

namespace ORNL
{
    class Circle
    {
    public:
        Circle(Point center, int64_t radius);

        //!
        //! \brief inversiveDistance InversiveDistance measure and describe the locations of two circles
        //! relative to each other. If two circles are exactly tangent and disjoint, then their inversive
        //! distance is exactly 1. If two circles are far apart, then their inversive distance is much greater
        //! than 1. If two circles are overlapping, then their inversive distance is between -1 and 1.
        //! Since the objective is to make all the circles of the vertices in the graph tangent and disjoint,
        //! we want all the inversive distances to be 1.
        //! \param other Pointer pointing to other circle to compute inversive distance.
        //! \return It returns inversive distance between circles.
        //!

        double inversiveDistance(QSharedPointer<Circle> other);

        //!
        //! \brief radius Sets radius of the circle.
        //! \param radius
        //!


        void radius(int64_t radius);

        //!
        //! \brief radius Returns radius of a circle.
        //! \return Radius of circle.
        //!

        int64_t radius();

        //!
        //! \brief pinPolygonId Returns id of polygon, circle belongs.
        //! \return Id of polygon associated with circle.
        //!

        int64_t pinPolygonId();

        //!
        //! \brief pinPolygonId Sets id of polygon associated with circle.
        //! \param pin_polygon_id Id of polygon associated with circle.
        //!

        void pinPolygonId(int64_t pin_polygon_id);

        //!
        //! \brief pinVertexId Returns id of vertex associated with circle.
        //! \return Id of vertex associated with circle
        //!

        int64_t pinVertexId();

        //!
        //! \brief pinVertexId Sets id of vertex associated with circle.
        //! \param pin_vertex_id id of vertex associated with circle.
        //!

        void pinVertexId(int64_t pin_vertex_id);

        //!
        //! \brief isSecondary Returns true, if circle is associated with a secondary vertex.
        //! Secondary vertices are vertices included by default in a graph generated by circle
        //! packing.
        //! \return True / False, based on association of circle with secondary vertex.
        //!

        bool isSecondary();

        //!
        //! \brief isSecondary Sets m_is_secondary based on association of circle with secondary vertex.
        //! Secondary vertices are vertices included by default in a graph generated by circle packing.
        //! \param is_secondary Bool assigned to m_is_secondary.
        //!

        void isSecondary(bool is_secondary);

        //!
        //! \brief center Returns center point of circle.
        //! \return Center point of circle.
        //!

        Point center();

        //!
        //! \brief center Sets center point of circle.
        //! \param center Center point of circle.
        //!

        void center(Point center);

    private:

        Point m_center;

        int64_t m_radius;

        int64_t m_pin_polygon_id;

        int64_t m_pin_vertex_id;

        bool m_is_secondary;
    };

}
#endif // CIRCLE_H
